﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Audit_Configuration_Oracle.Model;
using Oracle.DataAccess.Client;

namespace Audit_Configuration_Oracle.DAL
{
    public class LogInDAL
    {
        public static bool Connect(string user, string pass, string dbSchema)
        {
            bool res = false;
            ConnectionString cn = new ConnectionString(user, pass, "XE");
            DBConnectionSing db = DBConnectionSing.Db;
            db.cnx = cn;
            try
            {
                db.openConnection();
                res = true;
            }
            catch (OracleException e)
            {
                throw e;
            }
            finally
            {
                db.closeConnection();
            }            
            return res;
        }
    }
}
